/**
 * 
 */
package br.com.ctm.advogadope.dao.api;

import java.util.List;

import javax.ejb.Local;
import javax.persistence.PersistenceException;

import br.com.ctm.advogadope.model.Advogado;
import br.com.ctm.advogadope.model.Processo;
import br.com.framework.persistencia.api.BaseDao;

/**
 * @author Cleber
 *
 */
@Local
public interface ProcessoDao extends BaseDao<Processo> {

	/**
	 * @param advogado
	 * @param firstResult
	 * @param maxResults
	 * @param onlyActive
	 * @return
	 * @throws PersistenceException
	 */
	public List<Processo> findByAdvogado(Advogado advogado, int firstResult,
			int maxResults, boolean onlyActive) throws PersistenceException;
	
	/**
	 * @param filtro
	 * @param advogado
	 * @param firstResult
	 * @param maxResults
	 * @param onlyActive
	 * @return
	 * @throws PersistenceException
	 */
	public List<Processo> findByFiltroEAdvogado(Processo filtro, Advogado advogado, int firstResult,
			int maxResults, boolean onlyActive) throws PersistenceException;
	
	/**
	 * @param intervalo
	 * @param firstResult
	 * @param maxResults
	 * @param onlyActive
	 * @return
	 * @throws PersistenceException
	 */
	public List<Processo> findByDtAtualizacaoMaiorQueIntervalo(int intervalo, int firstResult,
			int maxResults, boolean onlyActive) throws PersistenceException;
}
